package com.ambitor.ipro.labelParser;

import java.util.List;

import com.ambitor.grass.util.data.IData;
import com.ambitor.ipro.exceptions.ProException;
import com.ambitor.ipro.service.TopService;
import com.taobao.api.domain.Item;

public class UnsalableLabelParser extends IntellLabelParser {

	public UnsalableLabelParser() {
	}

	public UnsalableLabelParser(TopService topService, IData userSession,
			int num) {
		super.setTopService(topService);
		super.setUserSession(userSession);
		super.setNum(num);
	}

	public List<Item> parse() throws ProException {
		String nick = this.getUserSession().getString("NICK");
		TopService topService = this.getTopService();
		return topService.getItemsOrderByCertainField(nick, this.getNum(),
				"volume", "asc");
	}
}
